
const { resolve } = require("path")
const HtmlWebpackPlugin = require("html-webpack-plugin")



module.exports = {
    entry: "./src/index.js",
    output: {
        filename: "bundle.js",
        path: resolve(__dirname, "bundle")
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: "./src/index.html"
        })
    ],
    // 生产环境下会自动压缩js代码
    mode: "production"
}